<?php include_component('tree'
                    , 'path'
                    , array('path' => 'products'
                        , 'label' => "PRODUCTS")); ?>
<br/>
<div class="text">
<?php if(has_any_role_id(array(MyConstants::ROLE_ADMIN, MyConstants::ROLE_MODERATOR))): ?>
<?php echo link_to(image_tag('add.png'
                            , array('title' => __('Create new categoy')))
                    , 'tree/createvirtualbr?tree_parent_id=' . $sf_request->getParameter('id', 0)
                    , array('confirm' => __('Are you sure?!'))); ?>
<?php echo link_to(__('Create new categoy')
                , 'tree/createvirtualbr?tree_parent_id=' . $sf_request->getParameter('id', 0)
                , array('confirm' => __('Are you sure?!'))); ?>
<?php endif; ?>
<?php /* @var $category Category */ ?>
<?php foreach( $arSiblings as $key => $c ): ?>
    <h1><?php echo link_to($c->getName(true) 
                    , 'tree/page?id=' . $c->getId()); ?>
        <?php if(has_any_role_id(array(MyConstants::ROLE_ADMIN, MyConstants::ROLE_MODERATOR))): ?>
            <?php echo link_to(image_tag('pencil.png'
                                        , array('title' => __('edit')))
                                , 'tree/edit?id=' . $c->getId()); ?>
        <?php endif; ?>
    </h1>
    <div class="dashed_line"></div>
    <?php $text = Textblocks::getOneByObj($c->getId(), MyConstants::TYPE_TREE_PAGE, MyConstants::STATUS_APPROVED); ?>
    <?php if($text && ($text->getText() != '')): ?>
        <?php echo $text->getText(); ?>
        <div class="dashed_line"></div>
    <?php endif; ?>
    <?php if( $photos = Files::getByObj(MyConstants::TYPE_TREE_PAGE, $c->getId()) ): ?>
    <?php foreach ( $photos as $photo): ?>
        <?php echo image_tag(
                        '/images/gallery/small/' . $photo->getUname()
                        , array(
                            'height' => '120'
                        )
                        ); ?>
    <?php endforeach; ?>
    <?php endif; ?>
	<div class="dashed_line"></div><br />
<?php endforeach; ?>
</div>
<div class="dashed_line">
</div>
<br/>